#include <random>
#include <iostream>
#include <functional>
#include "time.h"

std::random_device seedX;  //Generates a random sequence from an external device
std::random_device seedY;

std::mt19937 genX(seedX()); //the MT19937 generator
std::mt19937 genY(seedY());
//mt19937 produces integers in the range [0, 2^32-1]. However, we want numbers in the range [1, 6].
//The distribution uniform_int performs this transformation:
std::uniform_real<> distX(-5, 5);  //produces any of the values 1, 2, 3, 4, 5, or 6
std::uniform_int<> distY(5, 7);
std::function<int()> rndX = std::bind(distX, genX); //bind the generator with the distribution to the function rnd()
std::function<int()> rndY = std::bind(distY, genY);


float RandomFloatX()
{
	int min = -5; 
	int max = 5;
	
	float random = ((float) rand()) / (float) RAND_MAX;
	float range = max - min;  
	return (random*range) + min;
};

float RandomFloatY()
{
	int min = 5; 
	int max = 7;

	float random = ((float) rand()) / (float) RAND_MAX;

	float range = max - min;  
	return (random*range) + min;
};